package com.linkgie.galaxyframework.binaryserialize.impl;

import com.linkgie.galaxyframework.binaryserialize.BinaryCodec;

class BinaryTypeVersionContext {

	public final Class<?> sourceClass;

	public final ObjectRef<BinaryCodec> codec = new ObjectRef<>();

	// TODO:未实现多版本；
	// private HashMap<Long, DataSpecification> versionMap = new HashMap<>();

	public BinaryTypeVersionContext(Class<?> sourceClass) {
		this(sourceClass, null);
	}

	public BinaryTypeVersionContext(Class<?> sourceClass, BinaryCodec codec) {
		this.sourceClass = sourceClass;
		this.codec.set(codec);
	}

}